package com.sright.bcard.content.dal.dao.impl;

import com.sright.bcard.common.service.share.base.dao.BaseDAOImpl;
import com.sright.bcard.common.service.share.base.dao.BaseMapper;
import com.sright.bcard.content.dal.dao.CardUserCompanyInfoDAO;
import com.sright.bcard.content.dal.entity.CardUserCompanyInfoDO;
import com.sright.bcard.content.dal.mapper.CardUserCompanyInfoDOMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class CardUserCompanyInfoDAOImpl extends BaseDAOImpl<CardUserCompanyInfoDO> implements CardUserCompanyInfoDAO {

    @Resource
    private CardUserCompanyInfoDOMapper cardUserCompanyInfoDOMapper;

    @Override
    protected BaseMapper<CardUserCompanyInfoDO> getObjMapper() {
        return cardUserCompanyInfoDOMapper;
    }

    @Override
    public List<CardUserCompanyInfoDO> selectByCardUserInfoIds(List<Long> cardUserInfoIdList) {
        return cardUserCompanyInfoDOMapper.selectByCardUserInfoIds(cardUserInfoIdList);
    }

    @Override
    public List<CardUserCompanyInfoDO> selectByCompanyIds(List<Long> companyIds) {
        return cardUserCompanyInfoDOMapper.selectByCompanyIds(companyIds);
    }

    @Override
    public List<CardUserCompanyInfoDO> selectByCardUserInfoId(Long cardUserInfoId) {
        return cardUserCompanyInfoDOMapper.selectByCardUserInfoId(cardUserInfoId);
    }

    @Override
    public CardUserCompanyInfoDO selectByIdAndCompanyId(Long cardUserCompanyInfoId, Long companyId) {
        return cardUserCompanyInfoDOMapper.selectByIdAndCompanyId(cardUserCompanyInfoId,companyId);
    }

    @Override
    public void deleteById(Long id) {
        cardUserCompanyInfoDOMapper.deleteById(id);
    }

    @Override
    public CardUserCompanyInfoDO selectByCardUserInfoIdAndCompanyId(Long cardUserInfoId, Long companyId) {
        return cardUserCompanyInfoDOMapper.selectByCardUserInfoIdAndCompanyId(cardUserInfoId,companyId);
    }
}
